package com.itsense.stock.mapper;

import com.itsense.stock.pojo.entity.SysRolePermission;
import org.apache.ibatis.annotations.Param;

import java.util.ArrayList;
import java.util.List;

/**
* @author sense
* @description 针对表【sys_role_permission(角色权限表)】的数据库操作Mapper
* @createDate 2024-12-30 20:59:30
* @Entity com.itsense.stock.pojo.entity.SysRolePermission
*/
public interface SysRolePermissionMapper {

    int deleteByPrimaryKey(Long id);

    int insert(SysRolePermission record);

    int insertSelective(SysRolePermission record);

    SysRolePermission selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(SysRolePermission record);

    int updateByPrimaryKey(SysRolePermission record);

    /**
     * 插入用户角色数据
     * @param entities
     * @return
     */
    int insertRolePermission(@Param("entities") ArrayList<SysRolePermission> entities);

    /**
     * 返回用户角色信息
     * @param roleId
     * @return
     */
    List<String> getRolePermissions(@Param("roleId") String roleId);
}
